<div class="container" style="margin-top: 50px">
    <form class="form-horizontal well" action="#" method="post">
        <fieldset>
            <legend>
                <?php echo $this->titulo; ?>                
            </legend>

            <div class="form-actions" style="padding-left: 20px!important; margin-top: 0px">
                <div style="margin-left: 121px; margin-bottom: 30px">
                    <label style="display: inline-block; margin-right: 14px" for="matricula-tx_nome_aluno">Nome</label>
                    <input class="input-prepend required" style="margin-right: 25px" type="text" name="matricula[tx_nome_aluno]" id="matricula-tx_nome_aluno" maxlength="45"/>
                    <label style="display: inline-block; margin-right: 10px" for="matricula-tx_cpf">CPF</label>
                    <input class="input-prepend cpf validarCPF" style="margin-right: 25px" type="text" name="matricula[tx_cpf]" id="matricula-tx_cpf" maxlength="14"/>
                </div>                
                <div class="control-group">
                    <label class="control-label" for="matricula-nome_treinamento">Nome do Treinamento</label>
                    <div class="controls">
                        <input class="input-xlarge" type="text" name="matricula[nome_treinamento]" id="matricula-nome_treinamento" maxlength="45"/>
                    </div>
                </div>
                <div style="margin-left: 72px">
                    <label style="display: inline-block; margin-right: 16px" for="matricula-data_inicial">Data/Período</label>
                    <input class="input-prepend input-medium data" style="margin-right: 20px" type="text" name="matricula[data_inicial]" id="matricula-data_inicial" value=""/>
                    a
                    <label style="display: inline-block; margin-right: 16px" for="matricula-data_final"></label>
                    <input class="input-prepend input-medium data" style="margin-right: 25px; margin-left: 15px" type="text"  name="matricula[data_final]" id="matricula-data_final" value=""/>
                </div>
                <div style="margin-bottom: -20px; margin-top: -0px" class="form-actions">
                    <input class="btn btn-primary" id="btBuscarMatricula" type="button" value="Buscar"/>
                </div>
            </div>
        </fieldset>
        <div id="div_matricula" >

        </div>
    </form>

</div>

<script>

    $(function(){   
        
        $('#div_matricula').load('<?php echo $this->baseUrl('admin/matricula/grid'); ?>');
        $('#btBuscarMatricula').click(function(){            
            tx_nome_aluno = urlencodeGet($('#matricula-tx_nome_aluno').val());
            tx_cpf = urlencodeGet($('#matricula-tx_cpf').val());
            nome_treinamento = urlencodeGet($('#matricula-nome_treinamento').val());
            data_inicial = urlencodeGet($('#matricula-data_inicial').val());
            data_final = urlencodeGet($('#matricula-data_final').val());
            
            $('#div_matricula').load('<?php echo $this->baseUrl('admin/matricula/grid'); ?>'+'/tx_nome_aluno/' + tx_nome_aluno + '/tx_cpf/' + tx_cpf + '/nome_treinamento/' + nome_treinamento + '/data_inicial/' + data_inicial + '/data_final/' + data_final);
        });
        
    }); 
    
</script>